﻿using System;
using System.Threading;
using UtilZ.Dotnet.Ex.Base;

namespace ConAppCore
{
    internal class TestSnowflake
    {
        public static void Test()
        {
            //var time = TimeEx.TimestampToDateTime(1288834974657L);

            //var timestamp = TimeEx.GetTimestamp();
            //string str = timestamp.ToString();//1748250240013   13个字符

            var snowflakeId = new SnowflakeIdGenerator(DateTime.Parse("2020-01-01 00:00:00"), 1);

            for (int i = 0; i < 1000; i++)
            {
                Console.WriteLine(snowflakeId.Next());
            }
        }

    }

   
}
